<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Accenture Portal</title>
	<link rel="stylesheet" href="component/bootstrap-3.3.7-dist/css/bootstrap.css">
	<link rel="stylesheet" href="common/css/main.css">
	<link rel="stylesheet" href="common/css/allArticle.css">
	<script type="text/javascript" src="component/jquery-3.1.1.js"></script>
	<script type="text/javascript" src="component/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="common/js/index.js"></script>

<script type="text/javascript">
    /*     function setTab(name, m, n) {
            for (var i = 1; i <= n; i++) {
                var menu = document.getElementById(name + i);
                var showDiv = document.getElementById("cont_" + name + "_" + i);
                 showDiv.className = i == m ? "activeTab" : "";
                 showDiv.style.display = i == m ? "block" : "none";
            }
 
        } */

    	  var localization =  window.location.href.split("lang=")[1].substring(0,5);
    	if(localization!=""){
    		
    		var exdate = new Date();
    		   exdate.setDate(exdate.getDate() + 7 * 24 * 3600 * 1000);
    		   document.cookie = "lang=" + escape(localization) + ";expires=" + exdate.toGMTString();
    	
    	}
    	
	</script>

</head>
<body>

	<!-- head -->
	<div class="head clearfix">
		<h2 class="headtitle" style="padding-top: 13px"><spring:message code="AccenturePortal"/></h2>
		<ul class="nav">
			<li class="navlist" style="cursor: default;">
				${sessionScope.user.user_name}
			</li>
			<li class="navlist" style="cursor: default;">
				<div class="headimage">
					<img src="${sessionScope.user.user_image}" class="img-circle center-block" alt="" style="margin-top: 15px">
				</div>
			</li>
			<li class="navlist">
				<span class="glyphicon glyphicon-cog dropdown-toggle" id="navbarPreferences" aria-expanded = "true"   style="margin-top: 15px"></span>
				<ul class="dropdown-menu dropdownMenu" id="preferencesTab" role="menu" style="left:-120px;top:48px;">
					<li><a>TUTORIAL</a></li>
					<li class="divider" id="lineDivider" role="separator"></li>
					<li><a>PREFERENCES</a></li>
					<c:if test="${sessionScope.user.user_levelid eq 5}"> 
					<li class="divider" id="lineDivider" role="separator"></li>
					<li><a href="management.action"><spring:message code="MANAGEMENT"/></a></li>
					</c:if>
					<li class="divider" id="lineDivider" role="separator"></li>
					<li id="logoutNext"><a href="logout.action"><spring:message code="LOGOUT"/></a></li>	
					<li class="divider" id="lineDividerNext" role="separator"></li>
					<li id = "languageChange"><a href="http://localhost:8080/Accenture_Portal3.0/index.action?lang=zh_CN"><spring:message code="language.cn"/></a></li>
					<li class="divider" id="lineDividerNext" role="separator"></li>
					<li id = "languageChange"><a href="http://localhost:8080/Accenture_Portal3.0/index.action?lang=en_US"><spring:message code="language.en"/></a></li>
				</ul>
			</li>
		</ul>
	</div>

	<!-- link nav -->
	 <div style="z-index: 1003"> 
	<div class="nav-center" >
		<ul class="links-title" style="position: relative" id="links-title">
			<!--  append -->
		</ul>
	</div>


	<div class="tabList clearfix" id="thisLocal" >
	<!--div  append  -->
		
		<!--  <div class="subTitle">
	            <ul class="subNav"> -->
		              <!--  append -->
		<!--     </ul>
	          </div> -->
	           
	           
		<!-- <div class="content2"> -->
			<!--  append  -->
		<!-- </div> -->
		
		
    <!--  </div> -->
	</div>
</div>  
	

	<!-- carousel -->
	<div id="myCarousel" class="carousel slide">
		<!-- 轮播（Carousel）指标 -->
		<ol class="carousel-indicators">
			<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
			<li data-target="#myCarousel" data-slide-to="1"></li>
			<li data-target="#myCarousel" data-slide-to="2"></li>
			<li data-target="#myCarousel" data-slide-to="3"></li>
			<li data-target="#myCarousel" data-slide-to="4"></li>
		</ol>   
		<!-- 轮播（Carousel）项目 -->
		<div class="carousel-inner">

			<div class="item active" style="width:1583px;height:315px">
				<img src="${sessionScope.image.imgurl}" >
			</div>
			<c:forEach items="${imageList}" var="image">
				<div class="item" style="width:1583px;height:315px">
					<img src="${image.imgurl}" >
				</div>
			</c:forEach>
		</div>
	</div>
	
	<!-- down -->
	<div class="down" >
		<!-- search -->
		<div class="search-section" id="searchBlock" >
			<div class="searchlink "  >
				<input type="text" id="showsearch" class="searchinput" name="" placeholder=<spring:message code="FindSitesPeopleandMyLinks"/>>
				<span class="glyphicon glyphicon-search"></span>
			</div>
			<div id="hiddenPanel" class="panel panel-default">
				<div id="myLinksDivPrimary1" class="row" style="display:none;">
					<div id="SitesTitle" class="col-md-6">
						<h4>
							<span id="labelsTitle" class="label no-radius">Site</span>
						</h4>
						<div class="scroll" id="barScroll" people-scroll="">
                            <div class="col-md-10 col-sm-10 col-xs-12 col-lg-10">
                            	<div class="text-muted">
									<strong id="siteEmpty"/>
								</div>
                            	<div id="siteResults" style="list-style-type: none;">
            					</div>
                            </div>
                        </div>
					</div>
					<div id="PeopleTitle" class="col-md-6">
						<h4>
							<span id="labelsTitle" class="label no-radius">People</span>
						</h4>
						<div class="scroll" id="barScroll" people-scroll="">
                            <div class="col-md-10 col-sm-10 col-xs-12 col-lg-10">
                            	<div class="text-muted">
									<strong id="peopleEmpty"/>
								</div>
                            	<div id="peopleResults" class="peopleSearchProfile" style="list-style-type: none;">
            					</div>
                            </div>
                        </div>
					</div>
				</div>
	
				
			<!-- <script type="text/javascript">
				var form=document.getElementById('myLinksDivPrimary1');
				$(document).ready(function(){
					$("#showsearch").keyup(function(){ 
						form.style.display = 'block';
					});
				});
			</script> -->
				
				<div id="myLinksDivPrimary" class="row">
					<div id="myLinksTitle" class="col-md-6">
						<h4>
							<span id="labelsTitle" class="label no-radius">My Links</span>
						</h4>
					</div>
					<div id="myLinksActions" class="col-md-offset-4 col-md-2">
						<a aria-label="Left Align" ng-click="edit()">
                        	<span class="glyphicon glyphicon-pencil ac-cursor" aria-hidden="true"></span>
                    	</a>
                    	<a aria-label="Left Align" ng-click="add()">
                        	<span class="glyphicon glyphicon-plus ac-cursor" aria-hidden="true"></span>
                    	</a>
					</div>
					<!-- <div id="mylinkBack" class="col-md-offset-4 col-md-2">
						<a style="padding-left:-10px">
							<span id="myLinksBack" class="glyphicon glyphicon-chevron-left ac-cursor"></span>
						</a>
					</div> -->
				</div>
				
				<div class="row">
					<div id="overFlow">
						<div class="col-md-offset-4 col-md-6">
							<div class="col-md-offset-2 col-md-10" style="margin-left: 0">
								<div id="myLinksEmpty" class="text-muted">
									<p>You currently don’t have any My Links.</p>
									<p>Feel free to add links to your favorite websites here!</p>
								</div>
								<div id="myLinksResults" style="list-style-type: none;">
                            	</div>
							</div>
						</div>
						<div id="showForm" class="addLinksForm" style="display:none;">
                            <form name="myLinksForm" >
                                <h3 style="margin-top: 0px;">Add New Link</h3>
                                <div class="row form-space">
                                    <div class="col-md-9 col-sm-9 col-xs-9">
                                        <input class="form-control no-radius ng-pristine ng-untouched ng-invalid ng-invalid-required ng-valid-maxlength" required="" type="text" maxlength="100" placeholder="Title">
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-9 col-sm-9 col-xs-9">
                                        <input class="form-control no-radius ng-pristine ng-untouched ng-valid-url ng-invalid ng-invalid-required ng-valid-maxlength" required="" type="url" maxlength="100" placeholder="https://" ng-model="myLink.Url" https-prefix="">
                                    </div>
                                </div>
                                <div class="col-md-9 col-sm-9 col-xs-9" id="addMyLinksButton">
                                    <button class="btn btn-dark no-radius" type="submit" >
                                        ADD
                                    </button>
                                </div>
                            </form>
                        </div>
					</div>
				</div>
			</div>
		</div>

	
		<!-- content -->
		<div class="container maincontent">
			<!-- about me -->
			<div class="col-md-4 aboutme">
				<div class="panel panel-default no-radius">
					<div class="panel-heading no-radius">
						<div class="panelimg">
							<img src="common/images/user.png" alt="">
						</div>
						<h3 class="panel-title">
							<spring:message code="AboutMe"/>
						</h3>
					</div>
					<div class="panel-body">
						<div class="row">
							<div class="col-md-3">
								<div class="img-circle myimg">
									<img src="${sessionScope.user.user_image}" alt="">
								</div>
							</div>
							<div class="col-md-7">
								<h4><spring:message code="ViewMy"/></h4>
								<div class="infolist"><spring:message code="PersonalPage"/></div>
								<div class="infolist"><spring:message code="CareerLevel"/></div>
							</div>
							<a href="aboutMe.action">
								<div class="col-md-2 glyphicon glyphicon-menu-right innerme-arrow"></div>
							</a>
						</div>						
					</div>
					<div class="panel-footer no-radius">
						<a href="aboutMe.action" class="btn"><spring:message code="GOTOABOUTMEPAGE"/></a>
					</div>
				</div>
			</div>
			<!-- my scheduling -->
			<div class="col-md-4 myscheduling">
				<div class="panel panel-default no-radius">
					<div class="panel-heading no-radius">
						<div class="panelimg">
							<img src="common/images/myScheduling.png" alt="">
						</div>
						<h3 class="panel-title">
							<spring:message code="MyScheduling"/>
						</h3>
					</div>
					<div class="panel-body">				
						<div class="row scheduleTitleAssigments">
							<div class="col-md-10">
								<h4><b><spring:message code="ProjectAssignments"/></b></h4>
							</div>
							<div class="col-md-2">
								<a href="javascript:void(0)" class="options-icon">
									<span class="glyphicon glyphicon-option-vertical glyphiconAlert"></span>
								</a>
							</div>
							<div class="col-sm-7" id="panelAlert">
 								<ul class="alert-box">
									<li><a href="http://localhost:8080/Accenture_Portal2.0/management.action">Search open rols</a></li>									
									<li><a href="http://localhost:8080/Accenture_Portal2.0/management.action">Download myVC resume</a></li>
									<li><a href="http://localhost:8080/Accenture_Portal2.0/management.action">myScheduling</a></li>
								</ul>
							</div>

						</div>
						<%-- <c:forEach items="${scheduleList}" var="scheduling">	 --%>													
							<c:choose>												
								<c:when test="${not empty scheduling.schedule_name}">
									<div class="myScheduling-Calendar">
										<div class="row">
										<div class="col-md-4"><b><spring:message code="Client"/></b></div>
										<div class="col-md-4"><b><spring:message code="Project"/></b></div>
										<div class="col-md-4"><b><spring:message code="Role"/></b></div>
										</div>
										<div class="row scheduleDataProject">
											<div class="col-md-4">${scheduling.client}</div>
											<div class="col-md-4">${scheduling.project}</div>
											<div class="col-md-4">${scheduling.role}</div>
										</div>
										<div class="row">
											<div class="col-md-4"><b><spring:message code="StartDate"/></b></div>
											<div class="col-md-4"><b><spring:message code="EndDate"/></b></div>
										</div>
										<div class="row">
											<div class="col-md-4"><fmt:formatDate value="${scheduling.startDate}" pattern="MMM dd,yyyy" /></div>
											<div class="col-md-4"><fmt:formatDate value="${scheduling.endDate}" pattern="MMM dd,yyyy" /></div>
										</div>										
									</div>	
								</c:when>
								<c:otherwise>
									<div class="myScheduling-Calendar">
										No current project assignments scheduled
										<br></br>														
									</div>
								</c:otherwise>
							</c:choose>	
							<%-- </c:forEach> --%>					
						</div>
						
						<hr class="schedlastitem">
						<div class="paddingLf">
							<a href="http://localhost:8080/Accenture_Portal2.0/management.action"><u><spring:message code="RequestandUpdate"/></u></a>
							<br>
							<div class="row">
								<div class="col-sm-12">
									<h4 title="Your myCV-Resume last update date is listed here.">
										<b><spring:message code="myCVResume"/></b>
									</h4>
								</div>
							</div>
							<div class="row">
								<div class="col-sm-12"><spring:message code="myCVResumelastupdated"/><fmt:formatDate value="${scheduling.mycvResume}" pattern="MMM dd,yyyy" /></div>
							</div>	
							<a href="http://localhost:8080/Accenture_Portal2.0/management.action" title="Click here to link directly to your myCV-Resume in order to create or update it.">
								<u><spring:message code="UpdatemyCVResume"/></u>
							</a>
						</div>						
						<br></br>
					<div class="panel-footer no-radius">
						<a href="http://localhost:8080/Accenture_Portal2.0/management.action" class="btn"><spring:message code="GOTOTHESITE"/></a>
					</div>
					<%-- </c:forEach> --%>
				</div>
			</div>
			
			<!-- announcements -->
				<div class="col-md-4 announcements">
                        <div class="panel panel-default no-radius">
                              <div class="panel-heading no-radius">
                                    <div class="panelimg">
                                          <img src="common/images/announcements.png" alt="">
                                    </div>
                                    <h3 class="panel-title"><spring:message code="Announcements"/></h3>
                              </div>
                              <div class="col-md-12 annoucements-options">
                                    <div class="col-md-4" id="currentView">
                                          <span><spring:message code="CurrentView"/></span>
                                    </div>
                                    <div class="col-md-4 annoucements-borders">
                                          <span><spring:message code="ArchivedView"/></span>
                                    </div>
                                    <div class="col-md-4" id = "prMarkAsRead">
                                          <span><spring:message code="Markasread"/></span>
                                    </div>
                              </div>

                              <!-- <div class="add-scroll"> -->
                                    <div class="panel-body" id="getArticle" style="overflow-y:auto;height:380px"></div>

                              <!-- </div> -->

                              <div class="panel-footer no-radius" id="readMoreButton">
                           <!--          <button id="readMoreButton" type="button" class="btn">SEE&nbsp;MORE</button> -->
                                    <a class="btn"><spring:message code="SEEMORE"/></a>

                              </div>
                        </div>
                  </div>
            
			<!-- borrow book -->
			<div class="col-md-4 book">
				<div class="panel panel-default no-radius">
					<div class="panel-heading no-radius">
						<div class="panelimg">
							<img src="common/images/book.png" alt="">
						</div>
						<h3 class="panel-title">
							<spring:message code="BorrowBooks"/>
						</h3>
					</div>
					<div class="panel-body">
						<div class="row">
							<div class="col-md-7 book-body">
								<h4 style="padding-left:35px"><spring:message code="BorrowBooks"/></h4>
								<div class="infolist"><spring:message code="Youcanborrowbookshere!"/></div>
							</div>
							<a href="showBooks.action?borrowReaderid=${sessionScope.user.user_id}">
								<div class="col-md-2 glyphicon glyphicon-menu-right innerme-arrow"></div>
							</a>
						</div>						
					</div>
					<div class="panel-footer no-radius">
						<a href="showBooks.action?borrowReaderid=${sessionScope.user.user_id}" class="btn" ><spring:message code="GOTOBorrowBooksPAGE"/></a>
					</div>
				</div>
			</div>
<!-- 问卷==开始============================================================================= -->
			<div class="col-md-4 announcements">
				<div class="panel panel-default no-radius">
					<div class="panel-heading no-radius">
						<div class="panelimg">
							<img src="common/images/announcements.png" alt="">
						</div>
						<h3 class="panel-title"><spring:message code="Questionnaires"/></h3>
					</div>
					<div class="panel-body" id="newQuestionnaireList" style="overflow-y: auto; height: 380px"></div>
					<div class="panel-footer no-radius" id="readMoreButton">
						<a class="btn" href="openQuestionnaireListFront.action"><spring:message code="ALLQUESTIONNAIRES"/></a>
					</div>
				</div>
			</div>
<!-- 问卷==结束=================================================================================== -->
		</div>
		<!-- <button id="allQuestionnaire" type="button" onclick= "window.location='openQuestionnaireListFront.action'">All Questionnaire</button> -->
	</div>
<!-- footer -->	

	<div class="footer" >
		Copyright 2001 - 2017 Accenture. All Rights reserved. Accenture Confidential. For Internal Use Only. 
		<a href="#">Terms of Use</a> | 
		<a href="#">Privacy Statements</a>
	</div>


<!-- 首页popup -->
	<div class="fullScreen" id="showPopupIndex" >
		<div class="modal-content">
			<div class="popup">
				<div class="modal-header">
					<div class="row">
						<div class="col col-md-11" id="articleTitle">
							
						</div>
						<div class="col-md-1">
							<button type="button" class="close close-lg" id="closePopupIndex">×</button>
						</div>
					</div>
				</div>
				<div id="MailerContentArea"  style="height:550px">
					<div class="mailerContent" id="articleContentIndex">
						<%-- ${content} --%>
					</div>
				</div>
			</div>
		</div>		
	</div>
	
	<!-- 分页二次弹窗content -->
	<div class="fullScreen" id="showPopup" style="z-index: 1002">
		<div class="modal-content">
			<div class="popup">
				<div class="modal-header">
					<div class="row">
						<div class="col col-md-11" id="pageArticleTitle">
							
						</div>
						<div class="col-md-1">
							<button type="button" class="close close-lg" id="closePopup">×</button>
						</div>
					</div>
				</div>
				<div id="MailerContentArea" style="height:550px">
					<div class="mailerContent" id="articleContent" >
						<%-- ${content} --%>
					</div>
				</div>
			</div>
		</div>		
	</div>
	
	<!-- 分页弹窗 -->
		<div class="fullScreen" id="currentViewPopup" >
		<div class="modal-content" style="top: 5%;">
			<div class="popup">
				<div class="modal-header">
					<div class="row">
						<div class="col col-md-11" >
							<h3 class="modal-title"><spring:message code="CurrentView"/></h3>
						</div>
						<div class="col-md-1">
							<!-- × -->
							<button type="button" class="close close-lg"
								id="currentClosePopup">×</button>
						</div>
					</div>

				</div>
				<div id="MailerContentArea" style="height:450px">
					<div class="mailerContent">
						<div class="add-scroll">
							<br>
							<div class="col-md-12">
								<div class="col-md-7">
									<span style='font-weight: bold; font-size: 15px'><spring:message code="SUBJECT"/></span>
								</div>
								<div class="col-md-3 ">
									<span style='font-weight: bold; font-size: 15px'><spring:message code="SENDER"/></span>
								</div>
								<div class="col-md-2 ">
									<span style='font-weight: bold; font-size: 15px'><spring:message code="TIME"/></span>
								</div>
							</div>
							<hr>
							<div class="col-md-12" id="currentArticleList"></div>

						</div>
						
						<!-- ------------------------------------------------------------------------------------------------ -->
					</div>
				</div>
				<div class="navi"
							style="width: 260px; margin: 0 auto; padding-top: 20px;">
							<button type="button" id="lastPage"><spring:message code="Last"/></button>
							<button type="button" id="nextPage"><spring:message code="Next"/></button>
                            <spring:message code='currentpage'/>
                            <span id="currentpage"></span>
						</div>
						 <br>
			</div>
		</div>
	</div>


	<script type="text/javascript">
		$("#myCarousel").carousel('cycle');
		$(".glyphiconAlert").click(function(){
			    $("#panelAlert").toggle();
		});
		$("#navbarPreferences").click(function(){
		    $("#preferencesTab").toggle();
	});
	</script>
	<script type="text/javascript" src="common/js/operation.js"></script>
	<script type="text/javascript" src="common/js/link.js"></script>
</body>
</html>